package com.fire.market.server.impl;

import com.fire.component.dto.SingleResponse;


import com.fire.market.product.api.dto.ItemInfo;
import com.fire.market.product.api.result.ItemListResult;
import com.fire.market.product.api.service.ItemQueryFrontService;
import com.fire.market.service.impl.ItemQueryCoreService;
import org.apache.dubbo.config.annotation.Service;

import javax.annotation.Resource;

/**
 * ItemQueryFrontServiceImpl
 *
 * @author zwd
 * @date 2021/7/20
 */
@Service
public class ItemQueryFrontServiceImpl implements ItemQueryFrontService {
    @Resource
    ItemQueryCoreService itemQueryCoreService;

    @Override
    public SingleResponse<ItemInfo> getItemDetail(Integer itemId) {
        return SingleResponse.of(itemQueryCoreService.getItemDetail(itemId));
    }

    @Override
    public SingleResponse<ItemListResult> getItemList() {
        return SingleResponse.of(itemQueryCoreService.ListItem());
    }
}
